/* Some CSS Setup - nothing to do with flexbox */
html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font-family: sans-serif;
  margin: 0;
  background-image: linear-gradient(260deg, #2376ae 0%, #c16ecf 100%);
}

a {
  color:white;
  font-weight: 100;
  letter-spacing: 2px;
  text-decoration: none;
  background:rgba(0,0,0,0.2);
  padding:20px 5px;
  display: inline-block;
  width: 100%;
  text-align: center;
  transition:all 0.5s;
}

a:hover {
  background:rgba(0,0,0,0.3);
}

.toggleNav {
  display: none;
}

img {
  width:100%;
}

.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

input {
  padding:10px;
  border:0;
}


section, footer {
  text-align: center;
  background:rgba(0,0,0,0.2);
  padding:20px;
  margin:20px 0;
  color:white;
  font-weight: 100;
}

/* Flex Container */
.flex-nav ul {
  border:1px solid black;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

/* Flex items */
.flex-nav li {
  flex: 3;    
}

.flex-nav .social {
  flex: 1;
}


@media all and (max-width:1000px) {
  /* Let it wrap is important */
  .flex-nav ul {
    flex-wrap: wrap;
  }
  .flex-nav li {
    flex-basis: 50%;
  }
  /* overwrite the flex in .social */
  .flex-nav .social {
    flex-basis: 25%;
  }

}

@media all and (max-width:500px) {
  .flex-nav li {
    flex-basis: 100%;
  }

  .wrapper > * {
    order: 999;
  }

  .flex-nav {
    order: 1;
  }

  .flex-nav ul {
    display: none;
  }

  .flex-nav ul.open {
    display: flex;
  }

  .toggleNav {
    display: block;
  }

  .signup {
    order: 2;
  }

}